<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>第四阶段--动态页面--前后端分离--json</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        $(function (){
            $.getJSON("stujson",function (res){
                const names = res;
                for(let i = 0; i < names.length; i++){
                    $("#list").append("<li>"+names[i] + "</li>")
                }
            })
        })
    </script>
</head>
<body>
    <ul id="list"></ul>
</body>
</html>